Skip to content

timeout the paren searching #453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 31, 2016
Merged

timeout the paren searching #453

merged 5 commits into from
May 31, 2016

Conversation

bounceme
Copy link
Collaborator

the search pair function almost stalls my decently powerful macbook pro on really long lines, could be annoying because of minification etc.this function just makes it backwards compatible in old vim versions or builds without this feature.it is set to 300ms, though i am open to suggestions

the search pair function almost stalls my decently powerful macbook pro on really long lines, could be annoying because of minification etc.this function just makes it backwards compatible in old vim versions or builds without this feature
@@ -59,6 +59,14 @@ let s:syng_linecom = 'linecomment\c'
" Expression used to check whether we should skip a match with searchpair().
let s:skip_expr = "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'"

func s:searchpar(start,mid,end,flags,stop)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name is confusingly similar to searchpair. Perhaps s:searchparens would be clearer.

@davidchambers
Copy link
Collaborator

I look forward to this change. 👍

@bounceme
Copy link
Collaborator Author

yes, I agree on the name

@bounceme
Copy link
Collaborator Author

haha, just tried a skip_expr which instead match the paren syntax items instead of Not being a comment/string/regex. sadly it's just as slow

@bounceme bounceme merged commit 5962584 into develop May 31, 2016
@bounceme bounceme deleted the bounceme-patch-1 branch May 31, 2016 21:31
amadeus pushed a commit that referenced this pull request Jun 14, 2016
the search pair function almost stalls my decently powerful macbook pro on really long lines, could be annoying because of minification etc.this function just makes it backwards compatible in old vim versions or builds without this feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants